<div id="sidebar">
    <ul>
        <li>
            <a href="#" id="transaksi">Transaksi</a>
        </li>
        <li>
            <a href="<?= base_url() . 'akuntansi' ?>">Akuntansi</a>
        </li>
        <li>
            <a href="#" id="hutang">Hutang</a>
        </li>
        <li>
            <a href="#" id="piutang">Piutang</a>
        </li>
    </ul>
</div>
<div id="content" class="wrapper">
    <div id="page">

    </div>
</div>
<div class="clear"></div>
<script type="text/javascript">
    $.ajax({
        type:'POST',
        data:'koderetail='+'<?= $this->uri->segment(3); ?>',
        url: '<?= base_url() . 'retail/vtransaksi/' ?>',
        success: function(response){
            $('#page').html(response);
        },
        dataType:"html"
    });
    $('#transaksi').click(function(){
        $.ajax({
            type:'POST',
            data:'koderetail='+'<?= $this->uri->segment(3); ?>',
            url: '<?= base_url() . 'retail/vtransaksi/' ?>',
            success: function(response){
                $('#page').html(response);
            },
            dataType:"html"
        });    
    });
    $('#hutang').click(function(){
        $.ajax({
            type:'POST',
            data:'koderetail='+'<?= $this->uri->segment(3); ?>',
            url: '<?= base_url() . 'retail/vhutang/' ?>',
            success: function(response){
                $('#page').html(response);
            },
            dataType:"html"
        });    
    });
    $('#piutang').click(function(){
        $.ajax({
            type:'POST',
            data:'koderetail='+'<?= $this->uri->segment(3); ?>',
            url: '<?= base_url() . 'retail/vpiutang/' ?>',
            success: function(response){
                $('#page').html(response);
            },
            dataType:"html"
        });    
    });
</script>
